<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
/**
 * Description of Userfortree
 *
 * @author yonguo
 * @property int $id 主键id
 * @property int $uid 用户uid
 * @property int $treeid 树的种类ID
 * @property int $number 树的数量
 * @property string|null $updatedate 点击气泡更新积分的时间
 * @property int $times 剩余点击的次数
 * @property-read \App\Models\Treegame $user_for_tree
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Userfortree whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Userfortree whereNumber($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Userfortree whereTimes($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Userfortree whereTreeid($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Userfortree whereUid($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Userfortree whereUpdatedate($value)
 * @mixin \Eloquent
 */
class Userfortree extends Model
{
    
    protected $table = 'treeforuser';
    protected $primaryKey = 'id';
    protected $guarded = ['id'];

    public $timestamps = false;

     public function user_for_tree()
    {
        return $this->belongsTo(Treegame::class, 'treeid', 'catid');
    }
}
